using CxRomos.Core.Domain.Entities;
using FluentNHibernate.Mapping;

namespace CxRomos.Core.Domain.Mappings {
    public class ProfileAttributeTypeMap : ClassMap<ProfileAttributeType> {
        public ProfileAttributeTypeMap() {
            Table("[dbo].[ProfileAttributeTypes]");
            OptimisticLock.Version();
            LazyLoad();

            Id(x => x.ProfileAttributeTypeId)
                .Column("ProfileAttributeTypeId")
                .GeneratedBy.Identity();

            Map(x => x.AttributeType);
            Map(x => x.SortOrder);
        }
    }
}